package com.imooc.resource;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;


/**
 * 属性资源文件与类映射 - 定义
 *
 * @author: ZhaoYiChen
 * @create: 2020-10-09 14:24
 **/
@Component // 当前类交给spring进行管理，项目启动的时候会被扫描到
@PropertySource("classpath:file-upload-prod.properties") // 建立当前类和资源文件的映射关系
@ConfigurationProperties(prefix = "file") //定义当前类中属性的前缀
public class FileUpload {
    private String imageUserFaceLocation;
    private String imageServerUrl;

    public String getImageServerUrl() {
        return imageServerUrl;
    }

    public void setImageServerUrl(String imageServerUrl) {
        this.imageServerUrl = imageServerUrl;
    }

    public String getImageUserFaceLocation() {
        return imageUserFaceLocation;
    }

    public void setImageUserFaceLocation(String imageUserFaceLocation) {
        this.imageUserFaceLocation = imageUserFaceLocation;
    }
}
